refactor: remove sequencer batch generation and BLS signing#939
refactor: remove sequencer batch generation and BLS signing#939FletcherMan merged 7 commits intomainfrom
Conversation
Move L2 batch generation entirely off the consensus path so that the
tx-submitter becomes the sole producer of L1 batches. The sequencer no
longer seals/commits batches or carries BLS validator keys; consensus
only proposes blocks.
node:
- Drop core/{batch_seal,batch_commit,batch_test}.go and trim core/batch.go
down to GenesisBatchHeader (still needed by l2-genesis).
- Strip Batcher impls, BLS verification, valsByTmKey, batchingCache,
rollupABI, and BatchPointHeight/BatchIndex metrics from core/executor.go
and core/sequencers.go.
- Drop UpgradeBatchTime / BlsKeyCheckForkHeight from config.go and flags.go.
- Trim types/batch.go (remove l1TxNum/txsPayload, simplify Append),
types/blob.go (drop sequencer-side blob sealing helpers), and
types/retryable_client.go (drop CommitBatch/AppendBlsSignature; remove
batchHash *common.Hash from NewL2Block now that go-ethereum
morph-v2.2.2-alpha.2 also drops it).
- Remove BLS private-key load/pass from sequencer/tm_node.go and the
matching nil arg in sequencer/mock/sequencer.go.
- Clean dead helpers (HeightFromBlockBytes / WrappedBlockFromBytes /
HeightFromBlockContextBytes) from types/consensus_message.go.
- Delete cmd/keyconverter (depends on removed tendermint/blssignatures)
and its registration in cmd/node/main.go.
ops/tools:
- Delete ops/tools/bls12381 (dead BLS demo).
- Drop the BLS key generation block from ops/tools/keygen/main.go;
priv_validator_key / node_key / ETH account generation kept.
ops/docker + devnet:
- Delete ops/docker/node{0..3}/bls_key.json (no consumer left).
- Drop the matching COPY directives from ops/docker/Dockerfile.l2-node-4.
- Drop the bls_key.json copy step from ops/devnet-morph/devnet/setup_nodes.py.
deps:
- Bump go-ethereum submodule to morph-v2.2.2-alpha.2.
- Bump tendermint module to v0.3.5-alpha.1.
- make update propagates the new versions across all 8 Go modules.
Verified with go vet ./... and go test ./... -short -count=1 in node;
go vet ./... in tx-submitter / oracle / ops/tools / ops/l2-genesis /
token-price-oracle / bindings / contracts.
Made-with: Cursor
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughRemoves batch-building/BLS code and related metrics/tests; refactors executor/sequencer and retryable client APIs (NewL2Block); moves genesis batch-header builder into ops; deletes devnet BLS keys/tools; and bumps Morph go-ethereum and Tendermint versions across Makefile and many go.mod files. ChangesBatching, BLS, Sequencer & Runtime Refactor
Top-level dependency & module bumps
Sequence Diagram(s)sequenceDiagram
participant TM as Tendermint
participant Executor as Executor
participant Sequencer as Sequencer (mock)
participant L2Client as RetryableClient / AuthClient
participant Eth as Ethereum Rollup
TM->>Executor: DeliverBlock(txs, metaData, consensusData)
Executor->>Sequencer: update validators / seqTmKeySet
Sequencer->>Executor: provide l2Data
Executor->>L2Client: NewL2Block(ctx, executableL2Data)
L2Client->>Eth: submit NewL2Block tx
Eth-->>L2Client: tx result
L2Client-->>Executor: retry/err propagation
Executor-->>TM: finalize block delivery
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI lint failed on flags/flags.go:328 with "File is not properly formatted (gofmt)" — stray blank line left between the last flag declaration and the closing paren of the var block when UpgradeBatchTime / BlsKeyCheckForkHeight were removed in 82a9763. Made-with: Cursor
tendermint v0.3.5-alpha.2 removes the nextBatchParams return value from the L2Node.DeliverBlock interface (BatchParams is no longer consumed by the centralized sequencer pipeline). Align morph/node and clean up the follow-on dead code. node/core/executor.go: - DeliverBlock now returns only (nextValidatorSet, err); drop the *tmproto.BatchParams return value and the per-call batchParamsUpdates invocation. - Rename getParamsAndValsAtHeight -> getValidatorsAtHeight; drop the BatchBlockInterval / BatchTimeout reads from Gov contract. - Drop the unused batchParams field, the govCaller field/constructor, and the now-unused tmproto / time imports. node/core/sequencers.go: - Delete batchParamsUpdates and the now-unused tmproto / time / big imports. node/core/config.go: - Drop Config.GovAddress field, its default, and the GovAddr CLI parser branch — the address is no longer read by anything. node/flags/flags.go: - Drop the GovAddr CLI flag and its registration. deps: - Bump tendermint module to v0.3.5-alpha.2. - make update propagates the new version across all 8 Go modules. Verified with go vet ./..., gofmt -l ., make lint, and go test ./... -short -count=1 in node; go vet ./... in tx-submitter / oracle / ops/tools / ops/l2-genesis / token-price-oracle / bindings / contracts. Made-with: Cursor
Bring in the latest mainline updates while keeping this branch's current dependency pins during the in-flight refactor. Made-with: Cursor
Tendermint version mismatch (PR description vs Makefile)The Cross-repo coordination section states:
On branch TENDERMINT_TARGET_VERSION := v0.3.5-alpha.2and the workspace Please update the PR description (and any release notes) so the documented tendermint tag matches what the repo actually pins—otherwise reviewers and release tooling may chase the wrong tag. |
Dead memoization field in
|
Code review (additional findings)Found 2 more issues:
The Makefile references tag names while
This PR can't be the final merge state. Recommend: wait for morph-l2/go-ethereum #319 and morph-l2/tendermint #35 to merge, cut fresh tags from their final heads, then uniformly update Lines 1 to 6 in bb7552f Lines 3 to 14 in bb7552f
The PR correctly removed the sequencer-side encoders ( morph/node/derivation/batch_info.go Lines 108 to 173 in bb7552f 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Drop unused BatchHeaderV1 and the now-orphaned BatchHeaderV0 / BatchData helpers from node/types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go (1)
79-82: Strengthen this test with structural assertions, not only logging.Line [81] logs output but does not verify header invariants; regressions in layout can slip through.
Suggested assertions
genesisBatchHeaderBytes, err := GenesisBatchHeader(l2GenesisBlock.Header()) require.NoError(t, err) - t.Logf("generated genesis batch header bytes: %x \n", genesisBatchHeaderBytes) + require.Len(t, genesisBatchHeaderBytes, 249) + require.Equal(t, byte(0), genesisBatchHeaderBytes[0]) // V0 + require.Equal(t, l2GenesisBlock.Root().Bytes(), genesisBatchHeaderBytes[121:153]) // postStateRoot + t.Logf("generated genesis batch header bytes: %x \n", genesisBatchHeaderBytes)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go` around lines 79 - 82, The test currently only logs genesisBatchHeaderBytes; replace the log with structural assertions: require.NotNil/require.NotEmpty on genesisBatchHeaderBytes, require.Greater(len(genesisBatchHeaderBytes), 0) to ensure it's populated, and assert determinism by calling GenesisBatchHeader(l2GenesisBlock.Header()) a second time and require.Equal on the two resulting byte slices; reference the GenesisBatchHeader function and l2GenesisBlock.Header() to locate where to add these checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ops/l2-genesis/morph-chain-ops/genesis/batch.go`:
- Around line 24-40: GenesisBatchHeader currently dereferences header internals
and slices blockContext without guards; add checks at the start of
GenesisBatchHeader to ensure genesisHeader is non-nil, genesisHeader.Number (and
any other pointer big.Int fields you rely on, e.g., Number or BaseFee if
nullable in your types) is non-nil before calling Uint64() or using them, and
after calling wb.BlockContextBytes validate len(blockContext) >= 58 before
slicing; if any check fails, return a descriptive error instead of panicking.
Use the function name GenesisBatchHeader, the WrappedBlock construction and the
call to wb.BlockContextBytes to locate where to add these guards and error
returns.
---
Nitpick comments:
In `@ops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go`:
- Around line 79-82: The test currently only logs genesisBatchHeaderBytes;
replace the log with structural assertions: require.NotNil/require.NotEmpty on
genesisBatchHeaderBytes, require.Greater(len(genesisBatchHeaderBytes), 0) to
ensure it's populated, and assert determinism by calling
GenesisBatchHeader(l2GenesisBlock.Header()) a second time and require.Equal on
the two resulting byte slices; reference the GenesisBatchHeader function and
l2GenesisBlock.Header() to locate where to add these checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5f987e7c-a955-42a8-b875-993bb127399a
📒 Files selected for processing (6)
node/core/batch.gonode/types/batch.gonode/types/batch_header.goops/l2-genesis/cmd/genesis/cmd.goops/l2-genesis/morph-chain-ops/genesis/batch.goops/l2-genesis/morph-chain-ops/genesis/layer_two_test.go
💤 Files with no reviewable changes (3)
- node/core/batch.go
- node/types/batch_header.go
- node/types/batch.go
| func GenesisBatchHeader(genesisHeader *ethtypes.Header) ([]byte, error) { | ||
| wb := nodetypes.WrappedBlock{ | ||
| ParentHash: genesisHeader.ParentHash, | ||
| Miner: genesisHeader.Coinbase, | ||
| Number: genesisHeader.Number.Uint64(), | ||
| GasLimit: genesisHeader.GasLimit, | ||
| BaseFee: genesisHeader.BaseFee, | ||
| Timestamp: genesisHeader.Time, | ||
| StateRoot: genesisHeader.Root, | ||
| GasUsed: genesisHeader.GasUsed, | ||
| ReceiptRoot: genesisHeader.ReceiptHash, | ||
| } | ||
| blockContext := wb.BlockContextBytes(0, 0) | ||
| // Data hash for a single-block batch with no L1 messages: | ||
| // keccak256(blockContext[:58]). The last 2 bytes (numL1Messages) are excluded. | ||
| dataHash := crypto.Keccak256Hash(blockContext[:58]) | ||
|
|
There was a problem hiding this comment.
Add defensive guards to avoid panic paths in genesis header generation.
Line [24] and Line [39] currently assume non-nil header internals and fixed block-context length; malformed/unexpected input will panic instead of returning an error.
Proposed fix
import (
"encoding/binary"
+ "fmt"
"github.com/morph-l2/go-ethereum/common"
ethtypes "github.com/morph-l2/go-ethereum/core/types"
"github.com/morph-l2/go-ethereum/crypto"
@@
func GenesisBatchHeader(genesisHeader *ethtypes.Header) ([]byte, error) {
+ if genesisHeader == nil || genesisHeader.Number == nil || genesisHeader.BaseFee == nil {
+ return nil, fmt.Errorf("invalid genesis header: nil required field")
+ }
+
wb := nodetypes.WrappedBlock{
@@
}
blockContext := wb.BlockContextBytes(0, 0)
+ if len(blockContext) < 58 {
+ return nil, fmt.Errorf("unexpected block context length: %d", len(blockContext))
+ }
// Data hash for a single-block batch with no L1 messages:
// keccak256(blockContext[:58]). The last 2 bytes (numL1Messages) are excluded.
dataHash := crypto.Keccak256Hash(blockContext[:58])🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ops/l2-genesis/morph-chain-ops/genesis/batch.go` around lines 24 - 40,
GenesisBatchHeader currently dereferences header internals and slices
blockContext without guards; add checks at the start of GenesisBatchHeader to
ensure genesisHeader is non-nil, genesisHeader.Number (and any other pointer
big.Int fields you rely on, e.g., Number or BaseFee if nullable in your types)
is non-nil before calling Uint64() or using them, and after calling
wb.BlockContextBytes validate len(blockContext) >= 58 before slicing; if any
check fails, return a descriptive error instead of panicking. Use the function
name GenesisBatchHeader, the WrappedBlock construction and the call to
wb.BlockContextBytes to locate where to add these guards and error returns.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@go-ethereum`:
- Line 1: Update the submodule pointer to the exact commit for the release tag
and align metadata: change the submodule reference currently pointing at commit
045be0fdc7ca6f80e18eb4e26f7452500292ccec to the tagged commit
6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4 so the checked-out code matches
morph-v2.2.2, and update the go.mod pseudo-version (and any hardcoded commit
pin) to match that same tagged commit; also correct the PR description/version
strings (remove or replace morph-v2.2.2-alpha.2 and Tendermint v0.3.5-alpha.1)
so all references consistently point to morph-v2.2.2 and the proper Tendermint
release.
In `@Makefile`:
- Around line 2-4: The Makefile pins ETHEREUM_SUBMODULE_COMMIT_OR_TAG and
ETHEREUM_TARGET_VERSION to morph-v2.2.2 (commit 6fe64bb1f7e...), but go.mod pins
github.com/morph-l2/go-ethereum to pseudoversion
v1.10.14-0.20260506071313-045be0fdc7ca (commit 045be0fdc7ca), causing a
mismatch; fix by making them consistent: either update the go.mod pseudoversion
to the tagged commit (replace the v1.10.14-0...-045be0fdc7ca pseudoversion with
the revision that corresponds to
morph-v2.2.2/6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4) or change
ETHEREUM_SUBMODULE_COMMIT_OR_TAG / ETHEREUM_TARGET_VERSION in the Makefile to
use the commit/pseudoversion actually referenced by go.mod (045be0fdc7ca), and
re-run go mod tidy/sum to ensure the module files and Makefile are aligned.
In `@node/go.mod`:
- Around line 5-13: The node/go.mod currently pins
github.com/morph-l2/go-ethereum to the pseudo-version
v1.10.14-0.20260506071313-045be0fdc7ca which conflicts with the Makefile's
ETHEREUM_TARGET_VERSION := morph-v2.2.2; confirm whether the tag morph-v2.2.2
references commit 045be0fdc7ca and if so replace the pseudo-version with the tag
in node/go.mod (and mirror the change across all workspace go.mod files),
otherwise update the Makefile ETHEREUM_TARGET_VERSION to the correct tag or
commit that matches the pseudo-version used in all go.mod files so that the
Makefile's update logic and all module pins are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 72ae408b-4b0a-488b-94f7-2efe2c61c81d
⛔ Files ignored due to path filters (8)
bindings/go.sumis excluded by!**/*.sumcontracts/go.sumis excluded by!**/*.sumnode/go.sumis excluded by!**/*.sumops/l2-genesis/go.sumis excluded by!**/*.sumops/tools/go.sumis excluded by!**/*.sumoracle/go.sumis excluded by!**/*.sumtoken-price-oracle/go.sumis excluded by!**/*.sumtx-submitter/go.sumis excluded by!**/*.sum
📒 Files selected for processing (10)
Makefilebindings/go.modcontracts/go.modgo-ethereumnode/go.modops/l2-genesis/go.modops/tools/go.modoracle/go.modtoken-price-oracle/go.modtx-submitter/go.mod
| @@ -1 +1 @@ | |||
| Subproject commit 62952ec7d188953ee7b3224c3693baffa97c8084 | |||
| Subproject commit 045be0fdc7ca6f80e18eb4e26f7452500292ccec | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm the tagged commit in morph-l2/go-ethereum matches the submodule pointer.
# Expected: the commit SHA for morph-v2.2.2 should start with 045be0fdc7ca.
gh api repos/morph-l2/go-ethereum/git/ref/tags/morph-v2.2.2 \
--jq '.object | {type, sha}'
# Also check if the tag is annotated (object.type == "tag") and resolve to the commit:
gh api repos/morph-l2/go-ethereum/git/refs/tags \
--jq '.[] | select(.ref | endswith("morph-v2.2.2")) | {ref, sha: .object.sha}'Repository: morph-l2/morph
Length of output: 204
Submodule points to a commit that does not match the morph-v2.2.2 tag.
The tag morph-v2.2.2 in morph-l2/go-ethereum resolves to commit 6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4, but the submodule here points to 045be0fdc7ca6f80e18eb4e26f7452500292ccec. While the go.mod pseudo-version is internally consistent with the submodule pointer, neither aligns with the final tagged release. This means the build will use an untagged intermediate commit rather than the official morph-v2.2.2 release — exactly the risk highlighted in prior review feedback.
Additionally, the PR description references outdated version numbers (morph-v2.2.2-alpha.2 and Tendermint v0.3.5-alpha.1) that no longer match the actual pins in the code.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@go-ethereum` at line 1, Update the submodule pointer to the exact commit for
the release tag and align metadata: change the submodule reference currently
pointing at commit 045be0fdc7ca6f80e18eb4e26f7452500292ccec to the tagged commit
6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4 so the checked-out code matches
morph-v2.2.2, and update the go.mod pseudo-version (and any hardcoded commit
pin) to match that same tagged commit; also correct the PR description/version
strings (remove or replace morph-v2.2.2-alpha.2 and Tendermint v0.3.5-alpha.1)
so all references consistently point to morph-v2.2.2 and the proper Tendermint
release.
| ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.2.2 | ||
| ETHEREUM_TARGET_VERSION := morph-v2.2.2 | ||
| TENDERMINT_TARGET_VERSION := v0.3.7 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Resolve the tag morph-v2.2.2 in morph-l2/go-ethereum and compare with the commit hash in go.mod pseudoversion.
# Expected: the short SHA embedded in the pseudoversion (045be0fdc7ca) should match the commit the tag points to.
gh api repos/morph-l2/go-ethereum/git/refs/tags/morph-v2.2.2 2>/dev/null | jq '{ref: .ref, sha: .object.sha}'
gh api repos/morph-l2/go-ethereum/git/refs/tags/morph-v2.2.2/peeled 2>/dev/null || true
# Similarly for tendermint v0.3.7
gh api repos/morph-l2/tendermint/git/refs/tags/v0.3.7 2>/dev/null | jq '{ref: .ref, sha: .object.sha}'Repository: morph-l2/morph
Length of output: 366
The pseudoversion in go.mod files does not match the morph-v2.2.2 tag.
The tag morph-v2.2.2 in morph-l2/go-ethereum resolves to commit 6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4, but the go.mod files pin github.com/morph-l2/go-ethereum at pseudoversion v1.10.14-0.20260506071313-045be0fdc7ca (commit 045be0fdc7ca). This mismatch means the builds are using a different commit than the Makefile authorizes. If 045be0fdc7ca is an intermediate or unmerged commit on a branch head, it could be rebased or overwritten later, breaking reproducibility.
Align the pseudoversion with the final tagged commit or update the Makefile to use the matching commit.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@Makefile` around lines 2 - 4, The Makefile pins
ETHEREUM_SUBMODULE_COMMIT_OR_TAG and ETHEREUM_TARGET_VERSION to morph-v2.2.2
(commit 6fe64bb1f7e...), but go.mod pins github.com/morph-l2/go-ethereum to
pseudoversion v1.10.14-0.20260506071313-045be0fdc7ca (commit 045be0fdc7ca),
causing a mismatch; fix by making them consistent: either update the go.mod
pseudoversion to the tagged commit (replace the v1.10.14-0...-045be0fdc7ca
pseudoversion with the revision that corresponds to
morph-v2.2.2/6fe64bb1f7eb4a29671c2c7bb7764d66f0800df4) or change
ETHEREUM_SUBMODULE_COMMIT_OR_TAG / ETHEREUM_TARGET_VERSION in the Makefile to
use the commit/pseudoversion actually referenced by go.mod (045be0fdc7ca), and
re-run go mod tidy/sum to ensure the module files and Makefile are aligned.
| replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7 | ||
|
|
||
| require ( | ||
| github.com/cenkalti/backoff/v4 v4.1.3 | ||
| github.com/go-kit/kit v0.12.0 | ||
| github.com/hashicorp/go-multierror v1.1.1 | ||
| github.com/hashicorp/golang-lru v1.0.2 | ||
| github.com/holiman/uint256 v1.2.4 | ||
| github.com/klauspost/compress v1.17.9 | ||
| github.com/morph-l2/go-ethereum v1.10.14-0.20260317041928-1d4605778e32 | ||
| github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca |
There was a problem hiding this comment.
❓ Verification inconclusive
Script executed:
#!/bin/bash
set -euo pipefail
echo "== Versions in node/go.mod =="
rg -n 'morph-l2/(go-ethereum|tendermint)|replace github.com/tendermint/tendermint' node/go.mod
echo
echo "== Candidate Makefile pins =="
fd -i '^Makefile$' -HI | xargs -r rg -n 'ETHEREUM|TENDERMINT|morph-v|v0\.3\.'
echo
echo "== All go.mod pins for morph-l2 forks (workspace consistency) =="
fd -i 'go\.mod$' -HI | xargs -r rg -n 'github.com/morph-l2/(go-ethereum|tendermint)'
echo
echo "== Optional: go.work replacements/use blocks =="
fd -i '^go\.work$' -HI | xargs -r rg -n 'replace|use|morph-l2/(go-ethereum|tendermint)'Repository: morph-l2/morph
Repository: morph-l2/morph
Exit code: 0
stdout:
== Versions in node/go.mod ==
5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
13: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
== Candidate Makefile pins ==
Makefile:2:ETHEREUM_SUBMODULE_COMMIT_OR_TAG := morph-v2.2.2
Makefile:3:ETHEREUM_TARGET_VERSION := morph-v2.2.2
Makefile:4:TENDERMINT_TARGET_VERSION := v0.3.7
Makefile:7:ETHEREUM_MODULE_NAME := github.com/morph-l2/go-ethereum
Makefile:8:TENDERMINT_MODULE_NAME := github.com/morph-l2/tendermint
Makefile:14: `@if` grep -q '$(ETHEREUM_MODULE_NAME)' $(MODULE)/go.mod; then \
Makefile:15: sed -i '' -e "s|$(ETHEREUM_MODULE_NAME) v[0-9][^[:space:]]*|$(ETHEREUM_MODULE_NAME) $(ETHEREUM_TARGET_VERSION)|" $(MODULE)/go.mod; \
Makefile:18: `@if` grep -q '$(TENDERMINT_MODULE_NAME)' $(MODULE)/go.mod; then \
Makefile:19: sed -i '' -e "s|$(TENDERMINT_MODULE_NAME) v[0-9][^[:space:]]*|$(TENDERMINT_MODULE_NAME) $(TENDERMINT_TARGET_VERSION)|" $(MODULE)/go.mod; \
Makefile:45: echo "Updating go-ethereum submodule to tag $(ETHEREUM_SUBMODULE_COMMIT_OR_TAG)..."; \
Makefile:48: git checkout $(ETHEREUM_SUBMODULE_COMMIT_OR_TAG) && \
== All go.mod pins for morph-l2 forks (workspace consistency) ==
tx-submitter/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
tx-submitter/go.mod:12: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
token-price-oracle/go.mod:11: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
oracle/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
oracle/go.mod:10: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
ops/tools/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
ops/tools/go.mod:8: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
ops/l2-genesis/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
ops/l2-genesis/go.mod:9: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
node/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
node/go.mod:13: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
contracts/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
contracts/go.mod:9: github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
bindings/go.mod:5:replace github.com/tendermint/tendermint => github.com/morph-l2/tendermint v0.3.7
bindings/go.mod:7:require github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca
== Optional: go.work replacements/use blocks ==
3:use (
Resolve Makefile/go.mod version drift for morph-l2/go-ethereum before merge.
The node/go.mod pins github.com/morph-l2/go-ethereum v1.10.14-0.20260506071313-045be0fdc7ca (pseudo-version, commit 045be0fdc7ca), but the Makefile declares ETHEREUM_TARGET_VERSION := morph-v2.2.2 (tag). This drift will break the Makefile's dependency update logic and cause non-reproducible builds. All other modules in the workspace share this same mismatch.
In contrast, morph-l2/tendermint is consistently pinned as v0.3.7 across all modules, which matches the Makefile's TENDERMINT_TARGET_VERSION.
Confirm that morph-v2.2.2 tag points to commit 045be0fdc7ca, or update both the Makefile and all go.mod files to use aligned version pins.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@node/go.mod` around lines 5 - 13, The node/go.mod currently pins
github.com/morph-l2/go-ethereum to the pseudo-version
v1.10.14-0.20260506071313-045be0fdc7ca which conflicts with the Makefile's
ETHEREUM_TARGET_VERSION := morph-v2.2.2; confirm whether the tag morph-v2.2.2
references commit 045be0fdc7ca and if so replace the pseudo-version with the tag
in node/go.mod (and mirror the change across all workspace go.mod files),
otherwise update the Makefile ETHEREUM_TARGET_VERSION to the correct tag or
commit that matches the pseudo-version used in all go.mod files so that the
Makefile's update logic and all module pins are consistent.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve conflicts after PR #939 (remove sequencer batch generation): - node/types/batch_test.go: keep HEAD (multi_batch) version; it carries TestBatchHeaderV2 / TestBlobHashesHashUnavailableForLegacy which still exercise BatchHeaderV0/V1/V2 helpers retained on this branch. - go.work.sum: union both sides (toolchain entries from x/exp, x/mod, x/tools); identical go directive on both branches. - go-ethereum submodule: take main's 045be0fd (v2.2.2, includes the matching "Remove sequencer batch write paths" change for #939) over multi_batch's older 62952ec7. - common/go.mod: bump tendermint replace from v0.3.4 -> v0.3.7 to align with node/tx-submitter/contracts/oracle/ops modules; common itself has no tendermint imports, the directive was stale and was the cause of "conflicting replacements for github.com/tendermint/tendermint" in the workspace build. Co-authored-by: Cursor <cursoragent@cursor.com>
Now that common/batch carries the V2 routing fix and the MorphTx V1 wire decode fix (previous commit), redirect every consumer of the duplicated node/types symbols to the common/batch versions. Three sites touched: - node/derivation/batch_info.go: BatchHeaderBytes, MaxBlobBytesSize, RetrieveBlobBytes, DecodeTxsFromBytes — the parent header parse and blob byte extraction now go through the V2-aware helpers. - node/derivation/batch_info_test.go: BatchHeaderV0/V1, EmptyVersionedHash, MaxBlobBytesSize, MakeBlobCanonical, RetrieveBlobBytes — the file references EmptyVersionedHash and MakeBlobCanonical which main's PR #939 deleted from node/types, so this also unbreaks `go test ./node/derivation/...`. - oracle/oracle/batch.go: BatchHeaderBytes — its only nodetypes use; the nodetypes import is dropped here. tx-submitter/utils/utils.go is intentionally NOT touched in this PR even though it carries the same `node/types.BatchHeaderBytes` import: a naive switch to common/batch closes a cycle (common/batch → tx-submitter/db → tx-submitter/utils → common/batch). Untangling that cycle requires moving BatchCache / batch_storage / batch_query out of common/batch and down to tx-submitter/, which is a tx-submitter-owned refactor and out of scope here. node/types/batch_header.go is therefore kept alive in the next commit so that tx-submitter/utils continues to build; that file carries a DEPRECATED header documenting the cleanup path. types.WrappedBlock continues to come from node/types in batch_info.go — it's a node-only consensus type, not part of the duplicated batch encoding surface. Co-authored-by: Cursor <cursoragent@cursor.com>
…precated - Delete node/types/blob.go: nothing under tx-submitter/* or anywhere else still imports MaxBlobBytesSize / RetrieveBlobBytes / DecodeTxsFromBytes / MakeBlobCanonical from node/types after the previous commit, so it can go. - Delete node/types/batch_test.go: it referenced EmptyVersionedHash (which main's PR #939 already removed from node/types) and only exercised V0/V1 layout — the V2-aware unit tests now live in common/batch/batch_header_test.go. - Keep node/types/batch_header.go but add a DEPRECATED file-header comment: tx-submitter/utils/utils.go still imports BatchHeaderBytes from here, and the obvious cleanup (turn this file into a thin re-export of common/batch.BatchHeaderBytes) would close an import cycle (common/batch → tx-submitter/db → tx-submitter/utils → common/batch via the shim). The header comment documents the proper cleanup path: move BatchCache out of common/batch into tx-submitter/, then redirect utils, then delete this file. After this commit, the duplicate is intentional and documented. The remaining cleanup is owned by the tx-submitter team. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Move L2 batch generation entirely off the consensus path so that the
tx-submitterbecomes the sole producer of L1 batches. The sequencer no longer seals/commits batches or carries BLS validator keys; consensus only proposes blocks.Net change: 47 files, +232 / -1775 (heavy dead-code cleanup).
Changes
node/core/{batch_seal,batch_commit,batch_test}.go; trimcore/batch.godown toGenesisBatchHeader(still needed byl2-genesis).Batcherimpls, BLS verification,valsByTmKey,batchingCache,rollupABI, andBatchPointHeight/BatchIndexmetrics fromcore/executor.goandcore/sequencers.go.UpgradeBatchTime/BlsKeyCheckForkHeightfromcore/config.goandflags/flags.go.types/batch.go(removel1TxNum/txsPayload, simplifyAppend),types/blob.go(drop sequencer-side blob sealing helpers),types/retryable_client.go(dropCommitBatch/AppendBlsSignature; removebatchHash *common.HashfromNewL2Block).sequencer/tm_node.goand the matchingnilarg insequencer/mock/sequencer.go.HeightFromBlockBytes/WrappedBlockFromBytes/HeightFromBlockContextBytes) fromtypes/consensus_message.go.cmd/keyconverter(depends on removedtendermint/blssignatures) and its registration incmd/node/main.go.ops/tools/ops/tools/bls12381(dead BLS demo).ops/tools/keygen/main.go;priv_validator_key/node_key/ ETH account generation kept.ops/docker/+ devnetops/docker/node{0..3}/bls_key.json(no consumer left).COPYdirectives fromops/docker/Dockerfile.l2-node-4.bls_key.jsoncopy step fromops/devnet-morph/devnet/setup_nodes.py.deps
morph-v2.2.2-alpha.2(dropsbatchHashfromauthclient.NewL2Block; removes batch-write engine paths).v0.3.5-alpha.1(dropsblssignaturespackage and BLS args fromNewNode).make updatepropagates the new versions across all 8 Go modules.Test plan
cd node && go vet ./...✅cd node && go test ./... -short -count=1✅ (all packages PASS)go vet ./...intx-submitter/oracle/ops/tools/ops/l2-genesis/token-price-oracle/bindings/contracts✅grep -i bls_key→ 0 hitsgrep -E 'UpgradeBatchTime|BlsKeyCheckForkHeight'→ 0 hits in sourcemake devnet-upsmoke test (recommend before merge)Cross-repo coordination
Depends on (already merged / tagged):
morph-l2/go-ethereum@morph-v2.2.2-alpha.2morph-l2/tendermint@v0.3.5-alpha.1Made with Cursor
Summary by CodeRabbit
Chores
Refactor
Tests
New